Skip to content

+ add FPAQ0 order-0 arithmetic building block - #108

Merged
Hawkynt merged 1 commit into
mainfrom
feat/fpaq0-building-block
Aug 29, 2026
Merged

+ add FPAQ0 order-0 arithmetic building block#108
Hawkynt merged 1 commit into
mainfrom
feat/fpaq0-building-block

Conversation

@Hawkynt

@Hawkynt Hawkynt commented Aug 28, 2026

Copy link
Copy Markdown
Owner

What changed

  • add Fpaq0BuildingBlock as a missing entropy-coding primitive
  • reuse the existing binary arithmetic encoder/decoder with FPAQ0-style order-0 byte-prefix contexts
  • initialize each binary branch uniformly, adapt after each bit, and rescale counts before they grow large
  • keep the building-block envelope self-delimiting with a 4-byte original-length field
  • document the FPAQ-family reference and distinguish the CompressionWorkbench framing from an FPAQ archive file

Verification

Added NUnit coverage for:

  • empty input
  • highly repetitive data and compression ratio
  • repeated English phrase and compression ratio
  • random incompressible data
  • all 256 byte values
  • deterministic encoded vector
  • missing payload and negative-length rejection
  • stable registry metadata

A local .NET SDK is not available in this execution environment, so repository CI performs the compile and test run.

@Hawkynt
Hawkynt force-pushed the feat/fpaq0-building-block branch 2 times, most recently from 724bf86 to f2af1a4 Compare August 28, 2026 16:13
Reuses the binary arithmetic coder with order-0 byte-prefix contexts: each
branch starts uniform, adapts after every bit and rescales before its counts
grow large. The envelope stays self-delimiting with a four-byte length.

A rejection test held a stackalloc span and then read it from inside a lambda,
which the release build refuses.
@Hawkynt
Hawkynt force-pushed the feat/fpaq0-building-block branch from f2af1a4 to 542c559 Compare August 28, 2026 16:29
@Hawkynt
Hawkynt merged commit 7c7e266 into main Aug 29, 2026
5 of 6 checks passed
@Hawkynt
Hawkynt deleted the feat/fpaq0-building-block branch August 29, 2026 03:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant